
BP-Series for BG:EE and BG2:ToB (or w/ BGT & maybe TuTu), version 0.3024 (weidu version)

For "Vanilla" (or possibly for modded) installations

This has come a long ways since the first crude non-weidu version, with no detectable spells and in-game dialog strings. Now we have a fully-working, fully-integrated package of DS (special thanks to GeN1E) with BPSeries additions. We have fixes for STATE_DISEASED, for Wyverns and other farm animals with Class:Made, and a crude (non-perfect) fix for the buggy weapon enchantments and magic flags on BGEE weapons. We have a package that can not only install on BGEE, but on a BG2:ToB install as well (complete with support for HLA's). We're still conquering the "language barrier" in BGEE, but progess has been made (special thanks to Isaya).

For those who have been following/using the BPSeries for years now---these new scripts are CLEAN. I don't just mean the removal of mod content--they run far better than ever. That was my main reason for tking this approach. It was too difficult to work out the core systems with 101 mods in the way. The results are what you have before you now. 

Only when I'm happy enough with the core systems, will I begin to re-integrate mod content into these scripts. When I do this, it will be with a detection system (of sorts) that will check your install for a given mod, and only add its support to the script if it's in your current install. I think this sort of organization is going to be a huge boon to the community, as we mod into the years ahead. It also simplifies the debugging process, giving us a quick "mod-by-mod" breakdown of the scripts and ease in making repairs or in dealing with mod content updates.

Merry Christmas, and welcome to a Happy New Year of modding!
--Horred the Plague
   Dec 24, 2012

--Horred the Plague




INSTALLATION:   Merely extract  the package into your game folder (with special instructions for BGEE until mod compatibility is resolved--see the Modding forum at baldursgate.com for detailed instructions if you're unfamiliar).

I also snuck in a copy of the old BG2 AIcompile.exe, the default script compiler that Beamdog forgot to include. You can compile with NearInfinity or weidu via DLTCEP also, but it's nice to have backup methods.



Your Choice of Scripts (from the in--game scripts--customize GUI):

BPFT-CL: 
This script is designed for use with single and multiclass clerics,including priest kits.It offers support for all Divine spells up to seventh level, including class and kit innates and Bhaalspawn abilities. It provides low-level druidic spells and class abilities for the cleric/ranger, but no ranger kit support.
HOTKEYS: 
     D-Enable/Disable AI (Self)
     E-Toggle Item Use 
     K-Toggle Ranged/Melee 
     S-Summons 
     B-Buff (Toggle Long-Medium-Short Duration) 
     F-Toggle Thieving Mode (Stealth & Find Traps)
     N-Toggle Party Healing
     V-Toggle Turn Undead Mode

BPFT-TH: 
This script is designed for use with warrior and thief classes and kits.  It contains support for Hide and Detect, Backstab, and Lay Traps as well as class and kit innates and Bhaalspawn abilities. 
HOTKEYS: 
     D-Enable/Disable AI (Self)
     E-Toggle Item Use 
     K-Toggle Ranged/Melee 
     S-Summons
     V-Stealth Mode
     B-Find Traps Mode
     F-Backstab
     N-Lay Traps


BP-Multi: 
This script is designed for use with all single, dual, or multi-class combinations.  It favors spell use over physical attacks. It contains spell support for virtually all arcane, divine, class and kit innates and Bhaalspawn abilities.
HOTKEYS: 
     D-Enable/Disable AI (Self)
     E-Toggle Item Use 
     K-Toggle Ranged/Melee 
     S-Summons 
     B-Buff (Toggle Long-Medium-Short Duration) 
     V-Toggle Turn Undead 
     F-Toggle Thieving Mode (Stealth & Find Traps) 
     N-Toggle Party Healing

BP-PureF: 
This script is for single class fighters, and fighter kits. It has no spell support but does include class and kit innates and Bhaalspawn powers. 
HOTKEYS: 
     D-Enable/Disable AI (Self)
     E-Toggle Item Use 
     K-Toggle Ranged/Melee

BP-Range: 
This script is designed for use with spellcasting multiclasses and kit types, who prefer missile to melee combat.  It contains spell support for virtually all arcane, divine, class and kit innates and Bhaalspawn abilities.
HOTKEYS: 
     D-Enable/Disable AI (Self)
     E-Toggle Item Use 
     K-Toggle Ranged/Melee 
     S-Summons 
     F-Toggle Thieving Mode (Stealth & Find Traps) 
     V-Toggle Turn Undead 
     B-Buff (Toggle Long-Medium-Short Duration) 
     N-Toggle Party Healing


BPFT-RNG: 
This script is designed for use with a more pure warrior or rogue type, a non-spellcaster that prefer missile to melee combat.  It contains spell support for fighter, ranger, paladin and rogue class and kit innates and Bhaalspawn abilities.
HOTKEYS: 
     D-Enable/Disable AI (Self)
     E-Toggle Item Use 
     K-Toggle Ranged/Melee 
     S-Summons
     F-Toggle Backstab
     V-Toggle Thieving Mode (Stealth)
     B-Buff (Toggle Long-Medium-Short Duration)
     N-Toggle Thieving Mode (Detect Traps/Illusion)

BP-Bard: 
This script is designed for use especially with bards. It has spell support for Arcane spells up to level 8. It also includes a Battlesong toggle. 
HOTKEYS: 
     D-Enable/Disable AI (Self)
     E-Toggle Item Use 
     K-Toggle Ranged/Melee 
     S-Summons 
     B-Buff (Toggle Long-Medium-Short Duration) 
     N-Toggle Bardsong

BPFT-MGT: 
This script is designed for use with spellcasting warriors and/or rogues.  It has spell support for Arcane spells up to level 9 including wild wizardry.  It also includes warrior and rogue class and kit abilities. 
HOTKEYS: 
     D-Enable/Disable AI (Self)
     E-Toggle Item Use 
     K-Toggle Ranged/Melee 
     S-Summons 
     F-Toggle Backstab
     V-Toggle Thieving Mode (Stealth)
     B-Buff (Toggle Long-Medium-Short Duration) 
     N-Toggle Thieving Mode (Detect Traps/Illusion)
     
BPPaldin: 
This script is designed specifically for paladins, and paladin kits save blackguard. It supports all class and kit abilities,as well as clerical spells up to fourth level. They will try to heal and protect the injured in their party.
HOTKEYS: 
     D-Enable/Disable AI (Self)
     E-Toggle Item Use 
     K-Toggle Ranged/Melee 
     S-Summons 
     V-Toggle Turn Undead Mode
     B-Buff (Toggle Long-Medium-Short Duration)

BPRanger: 
This script is designed specifically for rangers, as well as ranger kits. It has spell support for Druidic spells up to level 3 and all class and kit abilities. It also offers a backstab toggle for stalkers. Archers lean towards ranged weaponry.
HOTKEYS: 
     D-Enable/Disable AI (Self)
     E-Toggle Item Use 
     K-Toggle Ranged/Melee 
     S-Summons
     V-Toggle Stealth Mode
     B-Buff (Toggle Long-Medium-Short Duration) 
     F-Backstab (Stalkers)

BPBlkGrd: 
This script is designed specifically for the new Bad Boys and Girls of the Sword Coast, the Blackguard kit. It has spell support for Clerical spells up to level 4, all kit and Bhaalspawn abilities. It lacks all support for party healing shouts by design.
HOTKEYS: 
     D-Enable/Disable AI (Self)
     E-Toggle Item Use 
     K-Toggle Ranged/Melee 
     S-Summons 
     B-Buff (Toggle Long-Medium-Short Duration)
     V-Toggle Turn Undead Mode~

BP-Mage: 
This script is designed for use with single-class wizards and specialist mages.  It has spell support for Arcane spells up to level 9 including wild wizardry and Bhaalspawn powers.  It also offers spell trigger, etc support by hotkey (Select Character First). They lean towards ranged combat but not as much as specialty scripts. 
HOTKEYS: 
     D-Enable/Disable AI (Self)
     E-Toggle Item Use 
     K-Toggle Ranged/Melee 
     S-Summons 
     B-Buff (Toggle Long-Medium-Short Duration) 
     V-Spell Trigger 
     N-Spell Trigger Select 
     F-Spell Trigger Confirm

BPFT-DR: 
This script is designed for use with druids, druid kits and fighter/druids.  It has spell support for Druidic spells up to level 7 including druid shapechange, class and kit abilities and Bhaalspawn powers.
HOTKEYS: 
     D-Enable/Disable AI (Self)
     E-Toggle Item Use 
     K-Toggle Ranged/Melee 
     S-Summons 
     N-Toggle Party Healing
     B-Buff (Toggle Long-Medium-Short Duration)

BPHEALC2: 
This script is a near-clone of BPFT-CL, part of an ongoing battle to eliminate duplicate party healing castings. Add this to your secondary healer, they'll have a 3-second delay added before they heal.
HOTKEYS: 
     D-Enable/Disable AI (Self)
     E-Toggle Item Use 
     K-Toggle Ranged/Melee 
     S-Summons 
     F-Toggle Thieving Mode (Stealth & Find Traps)
     V-Toggle Turn Undead Mode
     B-Buff (Toggle Long-Medium-Short Duration) 
     N-Toggle Party Healing
     
BPHEALD2: 
This script is a near-clone of BPFT-DR, part of an ongoing battle to eliminate duplicate party healing castings. Add this to your secondary healer, they'll have a 3-second delay added before they heal.
HOTKEYS: 
     D-Enable/Disable AI (Self)
     E-Toggle Item Use 
     K-Toggle Ranged/Melee 
     S-Summons 
     B-Buff (Toggle Long-Medium-Short Duration)
     N-Toggle Party Healing
     
BPHEALM2: 
This script is a near-clone of BP-Multi, part of an ongoing battle to eliminate duplicate party healing castings. Add this to your secondary healer, they'll have a 3-second delay added before they heal.
HOTKEYS: 
     D-Enable/Disable AI (Self)
     E-Toggle Item Use 
     K-Toggle Ranged/Melee 
     S-Summons 
     F-Toggle Thieving Mode (Stealth & Find Traps) 
     V-Toggle Turn Undead 
     B-Buff (Toggle Long-Medium-Short Duration) 
     N-Toggle Party Healing

BP-Monk: 
This script is strictly for monastic types. Support for special abilities, special considerations for monk's fist attacking. Special toggle for near and far opponent targetting preference--so you can make him an archer-chaser e.g. No automatic weapon switching support, be advised.
HOTKEYS: 
     D-Enable/Disable AI (Self)
     E-Toggle Item Use 
     V-Toggle Detect Traps
     B-Toggle Stealth Mode
     N-Toggle Near/Far Targetting

BPCL-MG:
This script is for cleric/mages, with or without fighter class. It emphasizes spell use, and ranged weapons over melee.
HOTKEYS: 
     D-Enable/Disable AI (Self)
     E-Toggle Item Use 
     K-Toggle Ranged/Melee 
     S-Summons 
     B-Buff (Toggle Long-Medium-Short Duration) 
     V-Toggle Turn Undead 
     N-Toggle Party Healing

***********New in v 0.3110**********
BP-BMage:
(Battle Mage) This script is designed for use with single-class wizards and specialist mages.  It has spell support for Arcane spells up to level 9 including wild wizardry and Bhaalspawn powers. Instead of Spell Triggers, this script allows you to adopt "Spellblaster" modes. What these do is bypass the normal Threat System to allow you to cast spells w/o concern for opponent strength. The Aggressive mode reduces Threat Level by 1 (on scale of 1-4), meaning you target more opponents with same spell. Aggressive Mode overrides the other 2 modes if active. These only override the Threat System, not other circumstantial checks. This script leans towards ranged over melee combat but not as much as other specialty scripts. 
HOTKEYS: 
     D-Enable/Disable AI (Self)
     E-Toggle Item Use 
     K-Toggle Ranged/Melee 
     S-Summons 
     B-Buff (Toggle Long-Medium-Short Duration) 
     V-Toggle Spellblaster (Attack) 
     F-Toggle Spellblaster (Defensive) 
     N-Toggle Aggressive Casting Mode




Mac OSX Instructions (by mlnevese):

In Finder, go to Applications/Baldur's Gate-EE/Game Data/00777/. Right click on "Baldur's Gate - Enhanced Edition" and select "Show Package Contents." Go to Contents/Resources. The Override folder will be there, along with the game data.

Unzip bpseriesxxxx inside the Resources folder

Open a terminal window.

Type, or just copy and paste the foollowing command:

cd /Applications/Baldur\'s\ Gate\ -\ Enhanced\ Edition/Game\ Data/00777/Baldur\'s\ Gate\ -\ Enhanced\ Edition.app/Contents/Resources/

Once inside the Resources folder type:

./bgee_install_BPSeries.sh

Follow the prompts on screen. 



New Mac Instructions (by Rathlord & me):

Place the setup-bpseries.tp2 file, and the weidu.exe, in your Resources folder.
Open a terminal in your Resource folder.
Type: .\weidu setup-bpseries.tp2 --log setup-bpseries.debug





Release Notes:

v0.0001   Very Early beta release

v0.0002   Hotfixes to shout system, hopefully no more looping and seizing up the script.
                  Fixes to HEALER system. Tested in-game and working.
                  ---New conditional blocks added to account for low level, low point party members
                  ---Healers now run mostly by shouts instead of sight checks. This "seems to" work better
                      in BG:EE for some reason (will investigate further)
                   Numerous minor code cleanups and optimizations

v0.0003   Set up the Diseased and Poisoned String shouts like the Injured, where it only displays a string
                  on-screen at the beginning and every 60 seconds afterwards. There are still "silent shouts"
                  every 6 seconds so the healer's script can hear of their problems
                  Added a GLOBAL 2-second delay any time a person heals themselves or another,
                  with either potion or spell. The purpose of this is to prevent duplication castings, 
                  not to delay the healing process unnecesarily.

v0.0004    Acquired Neera in party, so I added support for Nahal's Reckless Dweomer to BPFT-MGT,
                  ---BP-Multi and BP-Range. As a wild mage is a single class only, I recommend BPFT-MGT. 
                  ---When the spell is cast, control switches to Neera and the Dweomer "recast" 
                  ---interface opens. A split-second later, the game pauses for your spell choosing convenience.
                  ---It's not entirely foolproof yet, but worked properly the last few tests I gave it.
                  Worked on the healing systems even more. Self-healing and party healing. Concentrated on
                  ---parties with two or more healers at once (Jahiera and Branwen, might add Viconia soon).
                  ---Developed a method that seems to nearly eliminate any duplicate castings from two casters
                  ---both using the BPFT-CL script in HEALER mode. Instead of a Global Variable, I used a
                  --- ActionOverride() to IncrementGlobal() on the HEALCALL LOCALS timer of the nearby
                  ---Clerics. All at one-second different intervals. Side effect, it adds a delay in the "loser's"
                  ---recovery time before they can do their castings. But I had Branwen and Jahiera both
                  ---standing next to a wounded Khalid at the same time, and only one spell from the two
                  ---was cast on him. The other moved off a few seconds later to heal somebody else instead.
   
v0.1005   First WeiDu release of package
v0.1010  Added Detectable Stats into package, incorporated advanced intelligence back into scripts

v0.2015  Reworked Nahal's Dweomer Support. First attempt failed due to broken Action().
                ---Resorted to a 3-second warnng message, to give player time to select the wild mage.
                Added five new scripts to the set: BP-Mage, BPPaldin, BPRanger, BPFT-DR, BPBlkGrd.
                ---Reworked existing script. Scripts far more specialized and streamlined in most cases.
               ---Changed descriptions to match the changes, and removed the outdated BG2:ToB
                   referrences (English Only)
               ---Did my best to at least make the hotkey definitions accurate in all languages (where possible)
               Reworked the Party Healing system (again)
               ---Last system worked TOO well. It would stop healers in mid-casting sometimes
               ---Set up w/ a combination of shots, local vars, local timers, and a global timer. Not perfect but better
               ---Re-ordered blocks, accounted for <51 percent total HP w/o shout as well as w/ shout
               ---Seperate shout for <26 percent, given priority
               Set up support for cloud-type spells (Stinking Cloud, Web, Cloudkill, etc)
               ---Players will try to vacate cloud if injured and not immune to the ill effects
               ---PC's with Zone of Sweet Air will try to clear what clouds they can
               Reworked the radii for large AoE spells. Distance of 4 between enemy and party got party fried.
               ---Changed it so enemies must be Range > 12 and all party w/i Range 5, before cast
               Fixed Undead toggle, players were breaking turn w/o a good reason
               Added support for charmed party members, to not attack and also to attempt cure
               Support for spells that now have differences by caster level, such as Spiritual Hammer
               Removed 5HP minimum condition from final targetting block
               ---near-dead wimps were not getting attacked
               Redid the code on the final attack blocks, help prevent charmed party members from lynching
               Made some major changes in the Detectable Stats sytem. 
              ----The BG2 standard pack was operating  but not adding entries into spells--only into items. 
              ----Reverted to the BP Detectable Stats system from BPv180c, which does work as intended
              ----Updated old entries to match the current DS package, made corrections to a few errors
                   (Cloud spells were set up at wrong values)
               
0.2016   Quick Hotfix for bad reference in tp2 installer file.
                
0.3024   Huge update; package now works with BG2:ToB and BGEE
               ----Special UTF-8 encoded TRA files for BGEE (thanks to Isaya for research)
               ----Detects game install and assigns proper script code and ansi/utf-8 tra file as needed
               ----BG2 content contains BG2 items and HLA's in addition to BG1/BGEE content
               Brand-new "civilized" weidu installer complete with library files for functions
               ----The shocking part is that I did it myself
               ----Even more shocking? It works!!!
                Made it back to Detectable Spells package; working perfectly
               ---- Special thanks to GeN1E for putting up w/ my swearing while sorting it all out
               ---- Integrated BPSeries extra content in proper DS fashion
               ---- Made allowances to DS content for new BGEE entries (Blackguard innates)
               ---- Properly converted BPSeries cloud detection to DS standards
             More major fixes to healing system
               ----Now a second "clone" script provided for a secondary party healer. Secondary healer
                    has a short 1-round (6 second) delay before administering spells.
               ----Poison-curing and other ill effects removed from system (only handles HP healing spells)
               ----Potion use and potion-tossing removed from healer system 
                   (still pulses a short delay shout/global to try & help fight duplication)
               ----Self-healing checks for HEALER toggle, applies no penalties if not set to on
               ----Even all this is still not perfect. Sometimes party members still get double-healed.
                    I don't think there is a perfect answer w/in IE scripting limits. Will keep juggling ideas about...
               Reworked and simplified final attack blocks in all scripts
               ----Added more variation in melee/missile weapon selection. Rate varies by class/script
               ----Fighters more likely to charge w/ sword, followed by clerics, rogues, mage/bards, and archers
               ----Melee/Missile toggle still weighs heavily on choices. This covers special conditions
                    (e.g., 2 or more enemies close, or taking melee damage)
               ----Those using missile weapons will try to back away from melee combat
               Backstabbing code cleaned and bug-fixed
               ----FIX: Located bug where stealthed thieves would backstab innocents outside of combat
               Added missing support for Undead turning to BP-Multi and BP-Range
               Cleaned up some remaining TLK entries from early non-weidu BGEE version (funny-looking)
               Added new GAME-FIX subcomponents:
               ----FIX: STATE_DISEASED is broken in BG2 and BGEE. Now uses STATS.ids #134
                    Modders: See bpseries/lib/bg.tph file for details on values
                    ----This fix is both compatible with and can support aTweaks diseases including Mummy Rot
               ----FIX: "Wyvern Mages"---In BG2 and now BGEE Wyverns and some farm animals like cows
                    and chickens were set to be class Mage. This wreaked havoc on an AI system geared at
                    targetting enemy mages. Too many chickens have been Silenced by my party priests
                    over the years, this needed to change. :) Nor did I want to have to leave an extra line of
                    code in every spellcasting block of every script--e.g. !Race(NearestEnemyOf(Myself),WYVERN).
               ----FIX: Enchanted Weapons (sorta): BGEE left enchantment value at zero on many in-game
                    magic weapons (e.g., the old trusty +1 longsword) &/or forgot to set the Magical flag.
                    As a result, you could not hurt a being protected from normal weapons w/ a +1 sword.
                    A proper fix in in the works at Beamdog, so I did this crude patch for now. All it does is
                    check each weapon for Enchantment Value (Ench.) vs their THACO bonus value. IF Ench. is 0
                    and there's a positive, THAC0 bonus, Ench. is set to equal THAC0 bonus (e.g., it makes your
                    +1 longsword into a +1 longsword w/ Ench. = 1 instead of Ench. = 0). It also makes sure the
                    Magical flag is checked off. w/o this your +1 sword could break in the Iron Crisis e.g.
                Reworked the final (close-range/melee) targetting sequence so that Last Hitter takes precedence
                    over LastAttacker of Myself. Also added a STATE_CHARMED check. Also added check for
                    all party members for assisted-shout targetting instead just a single ([PC]) check.
                A very intense round of general script-cleaning, typo-fixing, reorganization, streamlining, etc etc

v0.3025-6  Hotfixes for dumb yet fatal issues
v0.3027     Fix for international TRA files, thanks to Isaya. Still a far stretch away, but doing our best
                   More fixes to the secondary healer system. It actually looks like it's working at last
                   More fixes to the cloud detection (fleeing) system. Derived some more constant targets 
                       to RunAwayFrom()
                   More fixes to the final targetting/attack blocks, some of it in hotfix 0.3025
                   A bit of general script cleanup, mostly on the BGEE side this time
v0.3028     Quick hotfix version to replace the funky Spanish Setup.tra (thanks to Lisandro, and to BGEE)
v0.3029    Yet another hotfix, that slippery line of TRA text in the tp2 file evaded TWO saves
v0.3030    Hotfix for the weapon enchantment fix--setting magic flag was breaking items. 
                   Leave it for the pros to fix (code removed, just adding enchanment bonus now).
v0.3031-3 Some oops-I-forgot-stuff fixes
v0.3034    Fix for blur-buffing, sleep and charm spells. Removed the 'enchantment fix' for BGEE because the latest patch fixed it properly.
v0.3040 Added Monk script (by request) for both games. Features near/far targetting, seperate stealth and find trap toggles, and no weapon switching support due to monk fists and engine limitations.
--Added another round of cleanup on the backstabbing; stabbers will only backstab if they detect a nearest enemy
v0.3041 New translations for Spanish, French and (BG2) Russian. Thanks to all the translators! Fixed a couple missing strings inside the BP-Monk script (Stunning Blow and Quivering Palm).

v0.3050  Added support for all the Update 2014 kits (BGEE). Added support for stealth &/or find traps toggles throughout BG2 and BGEE.
--Hotkey definitions vary by script. Some old ones were removed too. Please see above for details (only English is up to date this version)
--Set up a new form of cone-attack targetting w/ the Dragon Disciple Breath spell. Incorporated it into Cone of Cold (not foolproof but better)
--Monk HLA's re-added to the BG2 content
--Special stealthing allowances made for the Shadowdancer's Hide in Plain Sight ability
--Shadowstep auto-support is limited to emergency (20% or less Hit Points). Plot your own strategies otherwise :)

Code for the kits are accounted for in the following (BGEE only) scripts:
--Sun Soul and Dark Moon in BP-Monk
--Dwarven Defender in BP-PureF
--Shadowdancer in BPFT-TH, BPFT-CL, BPFT-MGT, BPFT-RNG, BP-Multi, BP-Range, BPHEALC2, BPHEALM2
--Dragon Disciple in BP-Mage, BPFT-MGT, BP-Multi, BP-Range, BPHEALM2

v0.3070 Revision of Cloud Detection System
v0.3071 Fix for SCS compatibility (works if BPSeries installed last)
v0.3072 Hot Fix for (above) Cloud Detection
                Fixed error in BPFT-TH hotkeys
                Detectable Spells fix for SCS compatibility (can install either order)
v0.3073 Finally got the mod version updated in installer
v0.3074 Proposed fix for reported stuttering behavior with mages (???)
               Fixes to cure potion passing and consumption code
               Fixes to enemy targetting blocks
               Made the BG2/BGT scripts more BG1-friendly--added targetting, threat levels, and curative code geared for lower levels
               NEW: Charming Rogue Kit for Imoen, by Vlad Pappar, and a custom BPSeries script for the class (BPCROGUE) *English only, for now*
               NEW: BP for BG1 -- Several of the Big Picture Enemy AI mod's scripts exported or converted over to BG1 counterparts. Very small-reaching at this stage, will be expanded upon as time passes. This singular component is NOT compatible with SCS!
v0.3075 FINALLY tracked down the mage stutter and thief hiding problems. I was testing in BGT, and this was a platform-specific issue to BG:EE. In the effort I cleaned up the hide & trap/illusion detection code for all games, and also figured out a way to add detect illusions to the one-hotkey hide-trap toggle. This is only offered if you're a thief, single/multi/dual.
v0.3076  Found some more inconsistencies between scripts in targetting blocks.
v0.3077-79 Hotfixes
v0.3080 Updated with new Russian and French Translations. Made sure Level 1 innates is named properly. All set to lower case for ease in Linux install.
v0.3081 Added a fix for the invisible creature (cloud detection) to keep consistent with BPv181
        Changed the Russian translation to NOT read "BGEE in English" by request (hopefully the patch catches up soon?)
        Made some tentative changes to the "party sees enemy, but I don't" section. (Had reports of stalling on this.)

v0,3100 (Shamelessly copied/pasted from SHS forums)
[*]Changes to the system which calls the party in sight of the nearest enemy (when they can't see them yet). This is doing much better--the only problem remaining is one I doubt I can fix. This system depends on globals being set, and there's an engine-imposed 1-second delay on this. Sometimes PC's will be charging an enemy, and turn around midstep to answer the shout (MoveToObject(LastHeardBy(Myself))
[*]Found the cause that made a ranger stop actions every 18 seconds while stealthed
[*]Cleanups to the 'potion passing' system. Only done when the victim is at 25% or less Hit Pts. This is because when passing at 50%, the potions weren't always being used.
[*]No longer requires a potion to be equipped, to be passed. This is because it's impossible to pass just 1 potion from a stack. And once passed, it isn't equipped on the new holder and thus was impossible to pass to another. Downsides: If you don't want potions to be passed, you'll have to toggle the item usage switch to "no disposables". Chances are it can find potions even hidden w/in a bag or case.
[*]I tried to stop the 18-second delay to a bard when singing a battlesong, but this is impossible. The fault lies in the engine itself. Test: Try moving a singing bard from one side of the screen to the other in one click, after turning off AI entirely. They'll still pause step every six seconds, and after 18 seconds (or less, depending on when you started walking in the cycle) they'll stop dead in their tracks.
[*]Tested completely w/ BG2EE, and working fine. In fact, most of my testing was done there. (don't ask how, and I won't have to lie to you :P )
[*]Attempted cleanups to the backstabbing system. It's still triggering after conversations and at battle's end, though not actually stabbing anybody. I doubt I can stop the convo part in ToB, but I have high hopes for BG2EE (and BGEE, when it gets the new scripting functions). Still not sure why it triggeers at battle's end, but I'll keep looking.
[*]Changed the BPINVISO creature to use a special ring instead of natural abilities. I believe this was causing some of the infequent reported problems. Either that, or the code is not applied universally (a few scripts missing it). The latter was more a BP symptom than BPSeries, so I'll concentrate effort there.
[*]Got the Level One Innates not only separated, but installing properly at last.
[*]The "BP Stats" now affect different IDS for BPSeries and BP, but they are complimentary and BP will now look for BPSeries already installed. I only saw a problem when BPSeries was installed BEFORE BP, which goes against my own suggested install order.
[*]Cleaned up some script parsing errors, associated w/ the BP Stats fix. Using more raw numbers, less identifiers. This is because there are new/different IDS entries on the "EE" side
[*]Added targetting checks so that those disabled (sleep, stun, hold, etc) are not entirely overlooked. Instead, they are prioritized to the bottom of the stack. After all, an active attacker is much more dangerous than a sleeping one (e.g). Script will check the 3 nearest enemies for disabilities, attacking the nearest first (but after any 'active' targets)
[*]Arbane's Sword now used automatically via script conditions (NOW WORKING!). More unaccounted-for items will follow.
[*]BP for BG1 and Charming Rogue removed from package (complications w/ custom kits and new BGEE patch).
[*]When a 'call for unseen enemy' is shouted, spellcaster types will attempt a buff or summons before advancing into combat. Thieves will no longer lay traps here, by default (they rarely did much good placed at random, anyways).
[*]Began testing with the new BGEE patch--will likely release new version when satisfied.
[*]// New in v0.3100 (all games)
@3125 = ~BPCL-MG: ~
@3126 = ~This script is for cleric/mages, with or without fighter class. It emphasizes spell use, and ranged weapons over melee.
HOTKEYS:
D-Enable/Disable AI (Self)
E-Toggle Item Use
K-Toggle Ranged/Melee
S-Summons
B-Buff (Toggle Long-Medium-Short Duration)
V-Toggle Turn Undead
N-Toggle Party Healing~
[*]Added Blackguard script for BG2EE.
[*]Updated Weidu to v23400, incorporated new functions into tp2 file.
[*]Rewired the way that Nahal's and Spell Immunity are handled. There will be a message on-screen, and then the game will pause just prior to casting the spell. The message tells you why (mentions the spell name, and person casting). You then have the choice of clicking on that person freely. You can choose to keep the spell at this stage, and the menu for it will pop up after casting. Or, you can give the person another action and the spell cancels w/o loss. If you ignore them at the pause, they'll probably waste the spell but no other losses should occur.
[*]Cleaned up the summoning (non-hotkey) code in several scripts
[*]Added all the new kit abilities and new kit HLA's into the BG2EE scripts. Still need to get Hexxat's racial abilities into BPFT-TH script (both games).
[*]Progressed w/ adding item usage throughout all 3 games' scripts. Made it from A to HELM before I ran out of gas. The hidden function unearthed by avenger_teambg, also present in BG2:ToB, can handle weapon abilities and items w/ several abilities. For now I'm using the item names for strings, but in a latter version I'll add custom strings for each item ability where needed (so you really know what's happening).


SCRIPTORS: Look for the new ACTION.IDS entry described above, installed by BP Series:

34 UseItemExt(S:Item*,O:Object,I:Slot*SLOTS,I:Abil*) 
--First 2 entries, just like UseItem(). Slot set to 0 by default, means Any Slot. Haven't tested non-zero. Ability is the item extended effect number (0=main,1,2). Works for weapons and also items with > 1 ability.

This works in BG:EE, BG2:EE, and BG2:ToB (the code was there all along, who knew until now?)

TRIGGER.IDS (Available in BG2:EE, installed by default)

0x40E0 NextTriggerObject(O:Object*)

I'll be working with this a lot more in the next version, rethinking strategy. Main goal this time was to get a stable version across the boards of new and old games, before parting ways and entering new territory. But this is a VERY handy function. It allows you to check things like Globals, Range, etc etc on another character! Things are now possible, that could only be dreamt of before. And there may be more goodies to come, in the future.

Example of use:

IF
  HaveSpell(WIZARD_FIREBALL) // Locked & loaded
  See(NearestEnemyOf(Myself)) // My fireball target, there they are
  !Range(NearestEnemyOf(Myself),15) // Am I w/in the fireball's range?
  NextTriggerObject(SecondNearestMyGroupOfType([PC])) //My second nearest buddy
  !Range(NearestEnemyOf(Myself),15) //Is my buddy in fireball range?
THEN
  RESPONSE #100
    Spell(NearestEnemyOf(Myself),WIZARD_FIREBALL) //Blast them!
END


v3110:

New script: Battle Mage . Essentially it overrides the Threat checks in various ways, making it more likely that spells are cast. 

Fixes to the casting system--finally found the cause of mages entering into combat loops. Fixes to the shapeshifting/polymorph system--still needs some work on druids, but basically aim to get them to revert after combat is concluded.

Restored the missing strings for the BP-Mage (et al) Sequencing/Spell Trigger system. Thanks to Isaya for rushing out a French translation!

Added new toggles to the weapon switching mode, by request:

Melee -- Intuitive (same as now, w/ balancing adjustments)
Ranged -- Intuitive
Melee -- Locked (won't switch, will soon switch back if manually switched)
Ranged -- Locked
Weapon Switching -- Absolute (switches to melee when enemies close, ranged when afar "almost" always)
No Weapon Switching (manual switching only)

Added support for a Blade Barrier spell to weapon switching (also backs away if too close) unless Locked. (Moral: If you really want to bash that cleric instead of plunk them w/ arrows, you have my blessing).

More cleanups to the backstabbing system -- also added check for new Ranged -- Locked setting

Added a check to the Shout for Party system, to help keep stealthed scouts from calling in the posse

Added a new subcategory to the Item Use system -- Healing Disposables Only (also by request)

A bunch of cleanups to "melee-oriented" special attacks. I discovered that several weren't meant for melee alone, and in conjunction w/ the new "Locked" system changed their conditions to reflect this.

Re-ordering of the attack blocks for disabled enemies, because they were still being ignored too much. Active enemies still have the preference, but the gap is closed somewhat.

Major overhaul to the attack/interrupt system. Over 40,000 lines of code changed! Now works off of a global 'Toggle Switch' instead of a Timer. This was part of what fixed the spellcaster--combat loop bug.

Major overhaul to the call-to-enemy and threat system. It's getting where I can't do much more w/o the new EE scripting functions, but it's better than before. Cleaned up several code inconsistencies across the 50-some scripts (easy to do, hard to spot for fixing).

Several fixes to the hotkey system. There's a rare bug with old save games and the new versions that shuts down buffing. If you get it, open the cheat console and run: SetGlobal("CALLED","GLOBALS",0). Or, edit the variable in your save's GAM file in editor of choice (I recommend DLTCEP for .GAM, NI for .SAV).

Added new script performance shutoffs (why run 10000+ lines of code when it's not needed?).

Fixed an odd bug w/ backstabbing where the player tried to backstab the dead.

Moved stoneskin from "autobuff" after rest to "buff by hotkey". Too many have been wasted by resting right before area transition. Still casts when needed in combat.

A few code revisions for Rogue Rebalancing and aTweaks compatability.

Changed Hotkeys on a couple scripts (bpft-mgt and bpft-rng. Now stealth and detect traps are split (V= stealth, N=detect trap/illusion), and there's no lay traps any more. If anybody misses it I can return it to BG2 (on the L hotkey). And I'll try to work with the translators to get the in-game descriptions corrected in the future.

Fixes to Mac OSX installer; should work fine for BGEE and BG2EE now. Simpler install - new instructions above

v0.3111 Quick hotfix. Search/Replace text editor function shredded several lines, and weidu didn't catch it. My fault for not checking in NI first, sorry.


v0.3120

Lots of in-game testing on BGEE and BG2EE, and lots of tested fixes

Checks for Disease now work. Victims will call for help, and healers will cure them.
ATweaks special Mummy Rot disease is accounted for. Clerics will not cast cures on those w/ the rot, except cure disease.

Part of this involved fixes that will heavily impact and greatly improve the healing system overall. I suspect most of the "healcall" shouts were being ignored entirely.

Added the GB-SMAGE/GB-SUMM scripts for summoned creatures, originally by Gebhard Blucher, to BP Series. These were already added by BP, and I was fixing an error anyways. This is tentative, much has changed since these script were written (c. 2002)--I may end up re-writing or replacing these in a future version. Let's see how it goes first.

Major fixes to the Call to Enemy system. Finally beat false alarms w/ conversations (barely). Better responsiveness, less lagging behind. Not nearly as apt to cast powerful buffs w/o real enemy confirmation (more likely not even, even when you should perhaps use it--engine/scripting limitations)

Fixes to the Backstabbing system. Also less likely to attack conversationalists, and to execute funny backstabs at end of combat. Won't try to stab dead enemies in EE. A side effect is they are more likely to try and stab from the front than before. I will try to correct this in future versions. There's still one type that can slip through the cracks, but I have yet to nail it down.

Shapeshifters druids and polymorphing mages now shift back to human form after combat. There appears to be an engine bug where the special abilities (polymorph types) don't vanish at expiration (become permanent), but at least the scripts seem to be able to handle their part.

Numerous spells were given conditional brush-ups. For now, just some of the more obvious flukes. e.g., a caster is far less likely to cone of cold their own party. A more complete revision yet to come.

A vulnerability spotted that prevented weapon combat (vs spells) from being used on someone w/ improved invisibility but no longer invisible. Another one still vs creatures that were formerly disabled in some way, and are now the last survivor.

More cleanups on weapon switching. Intuitive modes still need improvements, but the others are more sound.

Found an installer error in the "Wyvern Mage" component. It was byte-writing to Race instead of Class by mistake, actually messing things up more than helping. While at it, I added support for the Mordenkainen's Sword creature, because it is not HUMANOID nor race/class GNOLL. It is now [WEAPON.SWORD.LONG_SWORD] instead of [HUMANOID.GNOLL.GNOLL]

On the "one-button-thieving" scripts, I made the second setting now a search-no-stealth mode. Next version I might move stealth into the backstabbing toggle, and leave this key just for detect traps and detect illusions toggling. Much better user control when stealth and find traps are on different hotkeys. If I remember in time, and have other changes for translators, I'll update the in-game script descriptions too.

Added Support for Hexxat to BPFT-TH. This includes the Children of the Night, Blood Drain, and Domination. I didn't add cloak equipping support because via an old engine bug it can destroy another cloak if one was already equipped.

Added Support for Dorn's The Visage mask. If working right, will cover both acid breath and domination...Finally got UseItemExt (very useful) to install above UseItemSlot (almost useless) so it parse properly. In addition, I went through the four (4) vanilla BG2/EE scripts that used UseItemSlot. It was limited enough I was able to replace all-that-mattered with UseItem.

Ordering really matters on items, especially items that CastSpellAtObject (many do). The biggest thing to watch, is not to have the UseItem action below a DisplayStringHead action.I had to hand-edit all 60 scripts to fix this one, took an entire day.

As a result, item properties really work now. Tested with Dorn's The Visage mask, successfully dominated victim. Note that domination is ability #2 on the mask, so multiple item abilities can be handled! Start with 0 for ability #1, 1 for #2, etc. Just like for SelectWeaponAbility()

Now that the light is officially green, I'll be fleshing out the item support in upcoming editions. Stay tuned!


v0.3121 Quick hotfix -- Players imported from BG:EE to BG2:EE were having their scripts hammered by the reset of the game timers to zero. Code added to AR0602.bcs to execute a spell. The spell (BP-RESET.spl, plus 12 .eff files) sets all the necessary local variables to zero on the main PC, allowing a script reset
